package com.wang.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.stream.IntStream;

/**
 * @author 飞
 */
@Slf4j
@RestController
@RequestMapping("log")
public class LogController {

    //Logger log = LoggerFactory.getLogger(LogController.class);
    @GetMapping("/test")
    public String test(){
        IntStream.range(0, 1000).forEach(i -> {
            log.trace("hello trace");
            log.debug("hello debug");
            log.info("hello info");
            log.warn("hello warn");
        });
        return "SpringBoot日志管理";
    }

}
